<include file="Inc/html_header" />
<div class="searchBox mySelect">
    <form action="<?php echo U('article/index');?>" method="get">
        分类：<?php echo $categorySelect;?>&nbsp;&nbsp;&nbsp;&nbsp;
        状态：<select name="st"><option value="-1">全部</option><option value="1" <?php if(isset($params['st'])&&$params['st']=='1'){echo 'selected';}?>>正常</option><option value="0" <?php if(isset($params['st'])&&$params['st']=='0'){echo 'selected';}?>>关闭</option></select>&nbsp;&nbsp;&nbsp;
        文章标题：<input class="form-control form-focus input_text" type="text" name="title_like" size="20" value="<?php echo $params['title_like'];?>" />
        &nbsp;&nbsp;&nbsp;<input type="submit" name="so" class="btn btn-success" value="搜索" />
    </form>
</div>
<div class="mtop10">
	<table class="table table-bordered table-hover">
        <thead>
            <tr>
                <th width="40">ID</th>
                <th width="100">分类</th>
                <th>文章标题</th>
                <th width="100">来源</th>
                <th width="60">状态</th>
                <th width="88">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php
            if( ! empty($infos)){
                foreach($infos as $v){
                    $v['cid'] = intval($v['cid']);
                    $v['st'] = intval($v['st']);
            ?>
            <tr>
                <td class="tdf"><?php echo $v['id'];?></td>
                <td><?php echo $categoryKV[$v['cid']];?></td>
                <td><?php echo $v['title'];?></td>
                <td><?php echo $v['author'];?></td>
                <td><span class="c_p" onclick="articleStatus(<?php echo $v['id'];?>, <?php echo (1-$v['st']);?>)"><?php if($v['st']===1){echo '<span class="color_1">正常</span>';}else{echo '<span class="color_0">关闭</span>';}?></span></td>
                <td>
                    <a href="<?php echo U('article/del', array('id'=>$v['id']));?>" onclick="javascript:return confirm('确定要删除吗？')">删除</a> /
                    <a href="<?php echo U('article/edit', array('id'=>$v['id']));?>">修改</a>
                </td>
            </tr>
            <?php }}else{?>
            <tr>
                <td colspan="6">没有数据</td>
            </tr>
            <?php }?>
        </tbody>
	</table>
</div>
<script type="text/javascript" src="/js/admin/article.js"></script>
<include file="Inc/html_footer" />